<?php
$id = $_POST['id'];
$user = $_POST['user'];
$conn = new mysqli("localhost", "root", "", "simple_weibo");
$conn->query("set names 'utf8'");

$sql = "insert into weibo_sc(user, weibo_id) values ('".$user."', '".$id."')";
$res = $conn->query($sql);

if($res){
    echo "收藏成功";
}else {
    echo "收藏失败";
}
